# Copus, Hübert and Pellaton (2024)

This repository contains replication files for "Trading Diversity? Judicial Diversity and Case Outcomes in Federal Courts" in the _American Political Science Review_.

**Questions or comments?** Contact Ryan Hübert: https://ryanhubert.com/

## What is in this repository?

- The directory `data` contains the raw data used for the analyses in the paper and appendix.

- The directory `code` contains the python and R code required for doing the analyses in the paper and appendix. To replicate the findings in the paper, run each script in the order that they are numbered. Each file contains information about what packages and preparatory steps are required.

- The directory `model` contains the results of the analyses that appear in the published article.

- The directory `ms` contains the LaTeX code for the manuscript, as well as the supporting figures, tables and references.

## Data limitations

In the publicly available version of the replication files, access to the following data is restricted: 

1. All plaintiff names in the file `data/chp_apsr_plaintiff_data.csv` have been redacted.  

2. All judge names and ID numbers in the main dataset (file `data/chp_apsr_case_data.csv`) have been anonymized.

As a result of #1, the classification of plaintiffs' races, ethnicities and genders cannot be replicated with the publicly available replication files. Accordingly, execution of `code/chp_apsr_01_plaintiffs1.py` and `code/chp_apsr_02_plaintiffs2.R` will be unsuccessful. However, the dataset that is created with these two scripts is available in `outs/chp_apsr_plaintiff_identities.csv` and can be used for subsequent analyses. 

All other analyses are unaffected by these data limitations. 

Please contact the author(s) for more information.